<?php
include_once("../../service/productService.php");

$name = $_POST["name"];
$names = $_POST["names"];
$proId = $_POST["proId"];
 
if(isset($name)){
    deleteImageOfNormalProduct($name, $proId);
} else if(isset($names)){
    $arrayNames = split(",", $names);
    
    foreach($arrayNames as $each){
        deleteImageOfNormalProduct($each, $proId);    
    }
}
?>